package com.sy.core.model;


import java.io.Serializable;

public class ZTreeNode implements Serializable {

	private String id;	//节点id

	private String pId;//父节点id

	private String name;//节点名称

	private Boolean open;//是否打开节点

	private Boolean checked;//是否被选中

	private String  nodeType;//节点类型

	private String  iconClose;//图标关闭

	private String  iconOpen;//图标打开

	private String icon;//图标

	public String getIconOpen() {
		return iconOpen;
	}

	public void setIconOpen(String iconOpen) {
		this.iconOpen = iconOpen;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getIconClose() {
		return iconClose;
	}

	public void setIconClose(String iconClose) {
		this.iconClose = iconClose;
	}

	public String getNodeType() {
		return nodeType;
	}

	public void setNodeType(String nodeType) {
		this.nodeType = nodeType;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getpId() {
		return pId;
	}

	public void setpId(String pId) {
		this.pId = pId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getOpen() {
		return open;
	}

	public void setOpen(Boolean open) {
		this.open = open;
	}

	public Boolean getChecked() {
		return checked;
	}

	public void setChecked(Boolean checked) {
		this.checked = checked;
	}

	public static ZTreeNode createParent(){
		ZTreeNode zTreeNode = new ZTreeNode();
		zTreeNode.setChecked(true);
		zTreeNode.setId("0");
		zTreeNode.setName("顶级");
		zTreeNode.setOpen(true);
		zTreeNode.setpId("0");
		zTreeNode.setNodeType("0");
		return zTreeNode;
	}

	public ZTreeNode() {
	}

	public ZTreeNode(String id, String pId, String name) {
		this.id = id;
		this.pId = pId;
		this.name = name;
	}

	@Override
	public String toString() {
		return "ZTreeNode{" +
				"ID='" + id + '\'' +
				", 父ID='" + pId + '\'' +
				", 名称='" + name + '\'' +
				'}';
	}
}

